
Graphimation{

	noOfGeometries 1
	TrunkSegment Source{ data/patterns/geo/tree.geo
		hitTest 0
	}



	noOfBrushes 1
	FillBrush SolidColorBrush{
		Color{ 0.4 0.4 0.4 0.5 }
		opacity 1
	}



	noOfTransforms 3
	GrowScale Scale{
		x $scale
		y 1
	}

	Branch123T Translation{
		x 90
		y 0
	}

	Branch1S Scale{
		x 0.9
		y 0.9
	}


	noOfChildGxms 1
	Branch Graphimation{ data/patterns/leaf.d2g }

	noOfExecutables 1
	Main Procedure{
		noOfCommands 7
		PushTransform{ GrowScale }
		Fill{ TrunkSegment FillBrush }

		PushTransform{ Branch123T }

		PushTransform{ Branch1S }
		RenderGxm{ Branch }
		PopTransform{ }

		PopTransform{ }

	}




	noOfControllers 2
	CMain Const{
		target $scale 
		begin 0
		end 100000
		loops 1

		value 0

		noOfChildren 1
		Trigger{
			begin 0
			targetGxm Branch
			targetAnimation MainAnim
			
			noOfChildren 0
		}
	}
	CGrow Const{
		target null
		begin 0
		end 2500
		loops 0

		value 0

		noOfChildren 2
		Linear{
			target $scale
			begin 0
			end 2000
			loops 0

			beginValue 0
			endValue 1

			noOfChildren 0
		}
		Trigger{
			begin 1700
			targetGxm Branch
			targetAnimation Grow
			
			noOfChildren 0
		}
	}

	noOfAnimations 3
	MainAnim Animation{
		renderFunction null
		controller CMain
		transitionTarget null
	}
	Grow Animation{
		renderFunction Main
		controller CGrow
		transitionTarget Grown
	}
	Grown Animation{
		renderFunction Main
		controller null
		transitionTarget null
	}
}
